﻿<%@ Page Title="Register" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Register.aspx.cs" Inherits="Webbshop.Account.Register" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:CreateUserWizard ID="RegisterUser" runat="server" EnableViewState="False" 
        OnCreatedUser="RegisterUser_CreatedUser" 
        meta:resourcekey="RegisterUserResource1">
        <LayoutTemplate>
            <asp:PlaceHolder ID="wizardStepPlaceholder" runat="server"></asp:PlaceHolder>
            <asp:PlaceHolder ID="navigationPlaceholder" runat="server"></asp:PlaceHolder>
        </LayoutTemplate>
        <WizardSteps>
            <asp:CreateUserWizardStep ID="RegisterUserWizardStep" runat="server" 
                meta:resourcekey="RegisterUserWizardStepResource1">
                <ContentTemplate>
                    <h2>
                        <asp:Label ID="lblTitle" runat="server" meta:resourcekey="lblTitleResource" 
                        Text="Skapa ett nytt konto" />
                    </h2>
                    <p>
                        <asp:Label ID="lblInstruction" runat="server" meta:resourcekey="lblInstructionResource" 
                        Text="Använd formuläret nedan för att skapa ett användarkonto." />
                    </p>
                    <p>
                        <asp:Label ID="lblPasswordInstruction1" runat="server" 
                        meta:resourcekey="lblPasswordInstructionResource1" Text="Lösenordet måste vara minst" />
                        <%= Membership.MinRequiredPasswordLength %>
                        <asp:Label ID="lblPasswordInstruction2" runat="server" 
                        meta:resourcekey="lblPasswordInstructionResource2" Text=" tecken långt" />
                    </p>
                    <span class="failureNotification">
                        <asp:Literal ID="ErrorMessage" runat="server" 
                        meta:resourcekey="ErrorMessageResource1"></asp:Literal>
                    </span>
                    <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification" 
                         ValidationGroup="RegisterUserValidationGroup" 
                        meta:resourcekey="RegisterUserValidationSummaryResource1"/>
                    <div class="accountInfo">
                        <fieldset class="register">
                            <legend><asp:Label ID="legend" runat="server" meta:resourcekey="legendResource" 
                                    Text="Konto Information" /></legend>
                            <p>
                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" 
                                    meta:resourcekey="UserNameLabelResource1" />
                                <asp:TextBox ID="UserName" runat="server" CssClass="textEntry" 
                                    meta:resourcekey="UserNameResource1"></asp:TextBox>
                                
                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" 
                                     CssClass="failureNotification" 
                                    ErrorMessage="Du måste ange ett användarnamn." ToolTip="Du måste ange ett användarnamn." 
                                     ValidationGroup="RegisterUserValidationGroup" 
                                    meta:resourcekey="UserNameRequiredResource1" Text="*"></asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" 
                                    meta:resourcekey="EmailLabelResource1" />
                                <asp:TextBox ID="Email" runat="server" CssClass="textEntry" 
                                    meta:resourcekey="EmailResource1" />
                                
                                <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" 
                                     CssClass="failureNotification" ErrorMessage="Du måste ange ett E-Mail." ToolTip="Du måste ange ett E-Mail." 
                                     ValidationGroup="RegisterUserValidationGroup" 
                                    meta:resourcekey="EmailRequiredResource1" Text="*"></asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Label ID="FirstNameLabel" runat="server" AssociatedControlID="FirstName" 
                                    meta:resourcekey="FirstNameLabelResource1" Text="Förnamn:" />
                                <asp:TextBox ID="FirstName" runat="server" CssClass="textEntry" 
                                    meta:resourcekey="FirstNameResource1" />
                                
                                <asp:RequiredFieldValidator ID="FirstNameRequired" runat="server" ControlToValidate="FirstName" 
                                     CssClass="failureNotification" ErrorMessage="Du måste ange ett Förnamn." ToolTip="Du måste ange ett Förnamn." 
                                     ValidationGroup="RegisterUserValidationGroup" 
                                    meta:resourcekey="FirstNameRequiredResource1" Text="*"></asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Label ID="LastNameLabel" runat="server" AssociatedControlID="LastName" 
                                    meta:resourcekey="LastNameLabelResource1" Text="Efternamn:" />
                                <asp:TextBox ID="LastName" runat="server" CssClass="textEntry" 
                                    meta:resourcekey="LastNameResource1" />
                                
                                <asp:RequiredFieldValidator ID="LastNameRequired" runat="server" ControlToValidate="LastName" 
                                     CssClass="failureNotification" 
                                    ErrorMessage="Du måste ange ett Efternamn." ToolTip="Du måste ange ett Efternamn." 
                                     ValidationGroup="RegisterUserValidationGroup" 
                                    meta:resourcekey="LastNameRequiredResource1" Text="*"></asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Label ID="StreetLabel" runat="server" AssociatedControlID="Street" 
                                    meta:resourcekey="StreetLabelResource1" Text="Gatuadress:" />
                                <asp:TextBox ID="Street" runat="server" CssClass="textEntry" 
                                    meta:resourcekey="StreetResource1" />
                                
                                <asp:RequiredFieldValidator ID="StreetRequired" runat="server" ControlToValidate="Street" 
                                     CssClass="failureNotification" 
                                    ErrorMessage="Du måste ange en Gatuadress." ToolTip="Du måste ange en Gatuadress." 
                                     ValidationGroup="RegisterUserValidationGroup" 
                                    meta:resourcekey="StreetRequiredResource1" Text="*"></asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Label ID="PostalCodeLabel" runat="server" AssociatedControlID="PostalCode" 
                                    meta:resourcekey="PostalCodeLabelResource1" Text="Postnummer:" />
                                <asp:TextBox ID="PostalCode" runat="server" CssClass="textEntry" 
                                    meta:resourcekey="PostalCodeResource1" />
                                
                                <asp:RequiredFieldValidator ID="PostalCodeRequired" runat="server" ControlToValidate="PostalCode"  
                                     CssClass="failureNotification" ErrorMessage="Du måste ange ett Postnr." ToolTip="Du måste ange ett Postnr." 
                                     ValidationGroup="RegisterUserValidationGroup" 
                                    meta:resourcekey="PostalCodeRequiredResource1" Text="*"></asp:RequiredFieldValidator>
                            </p>
                            <p>
                                <asp:Label ID="PostalAreaLabel" runat="server" AssociatedControlID="PostalArea" 
                                    meta:resourcekey="PostalAreaLabelResource1" Text="Ort" />
                                <asp:TextBox ID="PostalArea" runat="server" CssClass="textEntry" 
                                    meta:resourcekey="PostalAreaResource1" />

                                <asp:RequiredFieldValidator ID="PostalAreaRequired" runat="server" ControlToValidate="PostalArea"  
                                     CssClass="failureNotification" ErrorMessage="Du måste ange en Ort." ToolTip="Du måste ange en Ort." 
                                     ValidationGroup="RegisterUserValidationGroup" 
                                    meta:resourcekey="PostalAreaRequiredResource1" Text="*"></asp:RequiredFieldValidator>
                            </p>
                            <hr />
                            <p>
                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" 
                                    meta:resourcekey="PasswordLabelResource1" Text="Lösenord:" />
                                <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" 
                                    TextMode="Password" meta:resourcekey="PasswordResource1" />

                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" 
                                     CssClass="failureNotification" ErrorMessage="Du måste ange ett Lösenord." ToolTip="Du måste ange ett Lösenord." 
                                     ValidationGroup="RegisterUserValidationGroup" 
                                    meta:resourcekey="PasswordRequiredResource1" Text="*"></asp:RequiredFieldValidator>
                            </p>
                            
                            <p>
                                <asp:Label ID="ConfirmPasswordLabel" runat="server" 
                                    AssociatedControlID="ConfirmPassword" 
                                    meta:resourcekey="ConfirmPasswordLabelResource1" Text="Bekräfta Lösenord" />
                                <asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" 
                                    TextMode="Password" meta:resourcekey="ConfirmPasswordResource1" />
                                
                                <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" 
                                    CssClass="failureNotification" Display="Dynamic" 
                                     ErrorMessage="Confirm Password is required." ID="ConfirmPasswordRequired" runat="server" 
                                     ToolTip="Confirm Password is required." 
                                    ValidationGroup="RegisterUserValidationGroup" 
                                    meta:resourcekey="ConfirmPasswordRequiredResource1" Text="*"></asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="PasswordCompare" runat="server"
                                    ControlToCompare="Password" ControlToValidate="ConfirmPassword" 
                                     CssClass="failureNotification" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                     ValidationGroup="RegisterUserValidationGroup" 
                                    meta:resourcekey="PasswordCompareResource1" Text="*"></asp:CompareValidator>
                            </p>
                        </fieldset>
                        <p class="submitButton">
                            <asp:Button ID="CreateUserButton" runat="server" CommandName="MoveNext" Text="Skapa konto" 
                                 ValidationGroup="RegisterUserValidationGroup" 
                                meta:resourcekey="CreateUserButtonResource1"/>
                        </p>
                    </div>
                </ContentTemplate>
                <CustomNavigationTemplate>
                </CustomNavigationTemplate>
            </asp:CreateUserWizardStep>
<asp:CompleteWizardStep runat="server" meta:resourcekey="CompleteWizardStepResource1"></asp:CompleteWizardStep>
        </WizardSteps>
    </asp:CreateUserWizard>
</asp:Content>
